package com.example.esaclient;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public  class TabTwTimeline extends Fragment {			
	 
	  View fragView;
	  TextView txtTw;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   	 
            fragView = inflater.inflate(R.layout.tabscontent, container, false);
           
           
           
           new GetMyPosts().execute("2","and SocialNetwork='Twitter'", 0,15, this);
           
            txtTw = (TextView) fragView.findViewById(R.id.tvTabText);
           

            return fragView;
    }


    
	public void GetMyPostsResult(String[] result){
		EsaPost ep;
		for (int i=0;i<result.length;i++)
			if(result[i]!=null){
			ep=new EsaPost(result[i]);
			txtTw.setText(txtTw.getText()+"\n"+ "["+ep.time+"] " +ep.message );
			}
		
		
		
	}
	
}